package com.vietnam.power.util;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;

public class DateTimeUtil {

	/**
	 * return current time based on timezone
	 * 
	 * @param timezone
	 * @return
	 */
	public static Date getCurrentDateByTimezone(String timezone) {
		Calendar calendar = new GregorianCalendar();
		TimeZone timeZone1 = TimeZone.getTimeZone(timezone);
		calendar.setTimeZone(timeZone1);
		return calendar.getTime();
	}
}
